package com.zzzyh.bookbackgroundsystem.service;

import com.zzzyh.bookbackgroundsystem.mapper.UserMapper;
import com.zzzyh.bookbackgroundsystem.pojo.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {

    @Autowired
    UserMapper userMapper;
    public Boolean login(String username, String password) {
        User user = userMapper.getUserByUsetName(username);
        if(user == null)
            return false;
        return user.getPassword().equals(password);
    }
}
